package com.thunbu.thunbu_meeting_system.dialog

import android.app.Activity
import com.hjq.toast.ToastUtils
import com.lxj.xpopup.core.CenterPopupView
import com.thunbu.lib_common.function.Consumer
import com.thunbu.thunbu_meeting_system.R
import com.thunbu.thunbu_meeting_system.view.treeView.TreeNode
import kotlinx.android.synthetic.main.dialog_operate.view.tv_cancel
import kotlinx.android.synthetic.main.dialog_operate_confirm.view.*

class OperatConfirmPop(val activity: Activity,val listener: Consumer<String>): CenterPopupView(activity) {
    override fun getImplLayoutId(): Int = R.layout.dialog_operate_confirm



    override fun onCreate() {
        super.onCreate()

        tv_cancel1.setOnClickListener {
            dismiss()
        }

        tv_confirm.setOnClickListener {
            if(!et.text?.toString().isNullOrEmpty()){
                listener.accept(et.text.toString())
                dismiss()
            }else{
                ToastUtils.show("请输入备注")
            }
        }

    }


}